package cn.csust.net2.manager.shared.po;

import java.io.Serializable;

import cn.csust.net2.manager.shared.xml.XmlInfo;
import cn.csust.net2.manager.shared.xml.XmlResources;

public class Table  extends PO implements Serializable{
	private static final long serialVersionUID = 1L;
	private int wordTableID;
	private String title;
	
	private String footer;
	
	private int colCount;
	
	private User user;
//	public Table(String title, String footer, int colCount, int rowCount,
//			List<PairCell> pairsCells) {
//		super();
//		this.title = title;
//		this.footer = footer;
//		this.colCount = colCount;
//		this.rowCount = rowCount;
//		this.pairsCells = pairsCells;
//	}
	
	public Table(){
		
	}
	
	public Table(int wordTableID, String title, String footer, int colCount
			, int rowCount,User user) {
		super();
		this.wordTableID = wordTableID;
		this.title = title;
		this.footer = footer;
		this.colCount = colCount;
		this.user = user;
		this.rowCount = rowCount;
	}

	private int rowCount;
	
//	private List<PairCell> pairsCells;
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getFooter() {
		return footer;
	}
	public void setFooter(String footer) {
		this.footer = footer;
	}
	public int getColCount() {
		return colCount;
	}
	public void setColCount(int colCount) {
		this.colCount = colCount;
	}
	public int getRowCount() {
		return rowCount;
	}
//	public List<PairCell> getPairsCells() {
//		return pairsCells;
//	}
//	public void setPairsCells(List<PairCell> pairsCells) {
//		this.pairsCells = pairsCells;
//	}
	public void setRowCount(int rowCount) {
		this.rowCount = rowCount;
	}
	public int getWordTableID() {
		return wordTableID;
	}
	public void setWordTableID(int wordTableID) {
		this.wordTableID = wordTableID;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}

	@Override
	public String getDisplayName() {
		// TODO Auto-generated method stub
		return this.getTitle();
	}

	@Override
	protected XmlInfo getXmlInfo(XmlResources instance) {
		XmlInfo xmlInfo = new XmlInfo();
		xmlInfo.setTextResource(instance.table());
		return xmlInfo;
	}
	
	
}
